package com.education.wisdom.service.impl;

import java.util.List;

import com.education.common.utils.Convert;
import com.education.wisdom.mapper.JrSchoolMapper;
import com.education.wisdom.pojo.JrSchool;
import com.education.wisdom.service.IJrSchoolService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

/**
 * 学校 服务层实现
 *
 * @author d
 * @date 2020-08-10
 */
@Service
public class JrSchoolServiceImpl implements IJrSchoolService {

    @Autowired
    private JrSchoolMapper jrSchoolMapper;

    /**
     * 查询学校信息
     *
     * @param id 学校ID
     * @return 学校信息
     */
    @Override
    public JrSchool selectJrSchoolById(Integer id) {
        return jrSchoolMapper.selectJrSchoolById(id);
    }

    /**
     * 查询学校列表
     *
     * @param jrSchool 学校信息
     * @return 学校集合
     */
    @Override
    public List<JrSchool> selectJrSchoolList(JrSchool jrSchool) {
        return jrSchoolMapper.selectJrSchoolList(jrSchool);
    }

    /**
     * 新增学校
     *
     * @param jrSchool 学校信息
     * @return 结果
     */
    @Override
    public int insertJrSchool(JrSchool jrSchool) {
        return jrSchoolMapper.insertJrSchool(jrSchool);
    }

    /**
     * 修改学校
     *
     * @param jrSchool 学校信息
     * @return 结果
     */
    @Override
    public int updateJrSchool(JrSchool jrSchool) {
        return jrSchoolMapper.updateJrSchool(jrSchool);
    }

    /**
     * 删除学校对象
     *
     * @param ids 需要删除的数据ID
     * @return 结果
     */
    @Override
    public int deleteJrSchoolByIds(String ids) {
        return jrSchoolMapper.deleteJrSchoolByIds(Convert.toStrArray(ids));
    }
}